home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / printing / scalable postscript pict / printcomments.h next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  5.6 KB  |  122 lines

  1. /*
  2.     File:        PrintComments.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by:     
  7.  
  8.     Copyright:    Copyright © 1984-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/26/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #include<Types.h>
  24. /*        Type                Kind    Data Size    Data Type        Description                        */
  25. #define    TextBegin            150    /*    6            TTxtPicRec        Begin text layout modifications        */
  26. #define    TextEnd                151    /*    0            NIL                End text layout modifications        */
  27. #define    StringBegin            152    /*    0            NIL                Begin segmented string                */
  28. #define    StringEnd            153    /*    0            NIL                End segmented string                */
  29. #define    TextCenter            154    /*    8            TTxtCenter        Specify center of rotation for        */
  30.                                 /*                                the TextBegin comment (above)        */
  31.                                 
  32. #define    LineLayoutOff        155    /*    0            NIL                Disable driver's line layout routine*/    
  33. #define    LineLayoutOn        156    /*    0            NIL                Enable driver's line layout routine    */    
  34. #define    LineLayoutConfig    157    /*    16            LLConfig        Customize driver's line layout routine*/
  35.  
  36. #define    PolyBegin            160    /*    0            NIL                Begin PostScript polygon            */    
  37. #define    PolyEnd                161    /*    0            NIL                End PostScript polygon                */    
  38. #define    PolyIgnore            163    /*    0            NIL                Ignore StdLine calls(for smoothed polys)*/    
  39. #define    PolySmooth            164    /*    1            PolyVerb        Smooth a polygon using B-Splines    */    
  40. #define    picPlyClo            165    /*    0            NIL                Close an open polygon(connect start and    */
  41.                                 /*                                end points                            */
  42.                                 
  43. #define    DashedLine            180    /*    -            TDashedLine        Begin PostScript line dashing        */
  44. #define    DashedStop            181    /*    0            NIL                End PostScript line dashing            */
  45. #define    SetLineWidth        182    /*    4            Point            Set hi resolution line width         */    
  46.  
  47. #define    PostScriptBegin        190    /*    0            NIL                Signal driver to ingnore Quickdraw calls*/
  48. #define    PostScriptEnd        191    /*    0            NIL                Re-enable Quickdraw                    */
  49. #define    PostScriptHandle    192    /*    -            Handle            Transfer a block of PostScript        */    
  50. #define    PostScriptFile        193    /*    -            StringHandle    Transfer a file of PostScript        */    
  51. #define    TextIsPostScript    194    /*    0            NIL                Use DrawString to send PostScript    */
  52. #define    ResourcePS            195    /*    8            Type/ID/Index    Transfer a resource of PostScript    */    
  53. #define    PSBeginNoSave        196    /*    0            NIL                Like #190 but doesn't save PS state */
  54.  
  55.  
  56. #define    RotateBegin            200    /*    4            TRotation        Begin hi-resolution graphics rotation*/    
  57. #define    RotateEnd            201    /*    0            NIL                End rotation                        */
  58. #define    RotateCenter        202    /*    8            Center            Specify center of rotation            */
  59.  
  60. #define    FormsPrinting        210    /*    0            NIL                Specify graphics to remain resident    */
  61.                                 /*                                for all pages in the print job        */
  62. #define    EndFormsPrinting    211    /*    0            NIL                Evict the residents                    */
  63.  
  64.  
  65. typedef struct TTxtPicRec {
  66.     unsigned char    tJus;        /* Justification for line layout of text.                                */
  67.     unsigned char    tFlip;        /* Horizontal or vertical flipping                                        */
  68.     short            tRot;        /* Text rotation (0..360) (for fractional rot., see extTTxtPicRec below)*/
  69.     unsigned char    tLine;        /* Single, 1 1/2, or double line spacing                                */
  70.     unsigned char    tCmnt;        /* Reserved                                                                */
  71. } TTxtPicRec, *TTxtPicPtr, **TTxtPicHdl;
  72.  
  73. typedef struct ExtTTxtPicRec {
  74.     unsigned char        tJus;        /* Justification for line layout of text.                            */
  75.     unsigned char        tFlip;        /* Horizontal or vertical flipping                                    */
  76.     short                tRot;        /* (Ignored)                                                        */
  77.     unsigned char        tLine;        /* Single, 1 1/2, or double line spacing                            */
  78.     unsigned char        tCmnt;        /* Reserved                                                            */
  79.     short                tRotFixed;    /* Text rotation (0..360)                                            */
  80. } ExtTTxtPicRec, *ExtTTxtPicPtr, **ExtTTxtPicHdl;
  81.  
  82. typedef struct TTxtCenter {
  83.     short        y, x;        /* Offset from current pen location to center of rotation            */
  84.     short    xFrac, yFrac;
  85. } TTxtCenter, *TTxtCenterPtr, **TTxtCenterHdl;
  86.  
  87. typedef struct TPolyVerb {
  88.     Boolean f7, f6, f5, f4, /* Reserved                                                            */
  89.         fPolyRes,             /* TRUE = Polygon was specified with doubled points                    */
  90.         fPolyClose,         /* TRUE = Polygon should be closed                                    */
  91.         fPolyFill,             /* TRUE = Polygon should be filled                                    */
  92.         fPolyFrame;            /* TRUE = Polygon should be framed                                    */
  93. } TPolyVerb, *TPolyVerbPtr, **TPolyVerbHdl;
  94.  
  95. typedef struct TDashedLine {
  96.     SignedByte    offset;        /* Offset as specified by PostScript ???                            */
  97.     SignedByte    centered;    /* (Ignored) ???                                                    */
  98.     SignedByte    dashed[];    /* Dynamic array of dash intervals                                    */
  99. } TDashedLine, *TDashedLinePtr, **TDashedLineHdl;
  100.  
  101. struct PSRsrc {
  102.     ResType        PSType;        /* Resource type.  (Actual resource format is 'STR ' or 'STR#')        */
  103.     short        PSID;        /* Resource ID.                                                        */
  104.     short        PSIndex;    /* If PSType = 'STR ' then 0 otherwise index into 'STR#'.            */
  105. };
  106. typedef struct PSRsrc *PSRsrcPtr, **PSRsrcHdl;
  107.  
  108. typedef struct Rotation 
  109. {
  110.     short    flip;            /* Horizontal/vertical flipping (0=none,1=horizontal,2=vertical)    */
  111.     short    angle;            /* Clockwise rotation in degrees (0..360)                            */
  112. } Rotation, *RotationPtr, **RotationHdl;
  113.  
  114. typedef struct ExtRotation 
  115. {
  116.     short        flip;        /* Horizontal/vertical flipping (0=none,1=horizontal,2=vertical)    */
  117.     short        angle;        /* (Ignored)                                                        */
  118.     Fixed        angleFixed;    /* Clockwise rotation in degrees (0..360)                            */
  119. } ExtRotation, *ExtRotationPtr, **ExtRotationHdl;
  120.  
  121.  
  122.